

package com.scalar.chiptrack.sales.forms;


import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;

import com.scalar.chiptrack.ChipTrackActionForm;


/**
 * Form bean for the customer_list page.  This form has the following fields,
 * with default values in square brackets:
 * <ul>
 * <li><b>action</b> - The maintenance action we are performing (Create, Delete,
 *     or Edit).
 * <li><b>customer name</b> - The customer name for the search.  [OPTIONAL]
 * </ul>
 *
 * @author Kesava Kumar Achanala
 * @version $Revision: 1.1.1.1 $ $Date: 2006/12/11 23:43:20 $
 */




public final class SelectCustomerForm extends ChipTrackActionForm {


    // --------------------------------------------------- Instance Variables


    /**
     * The customer name.
     */
    private String customerName = null;
    private String selectedCustomer = null;

    // ----------------------------------------------------------- Properties


    /**
     * @return customerName
     */
    public String getCustomerName() {

	return customerName;

    }


    /**
     * Set the customername
     *
     * @param customerName
     */
    public void setCustomerName(String customerName) {

        this.customerName = customerName;

    }

    /**
     * @return selectedCustomer
     */
    public String getSelectedCustomer() {
	return selectedCustomer;
    }


    /**
     * Set the SelectedCustomer
     *
     * @param SelectedCustomer
     */
    public void setSelectedCustomer(String selectedCustomer) {

        this.selectedCustomer = selectedCustomer;

    }



    // --------------------------------------------------------- Public Methods


    /**
     * Reset all properties to their default values.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {
       

    }


    /**
     * Validate the properties that have been set from this HTTP request,
     * and return an <code>ActionErrors</code> object that encapsulates any
     * validation errors that have been found.  If no errors are found, return
     * <code>null</code> or an <code>ActionErrors</code> object with no
     * recorded error messages.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public ActionErrors validate(ActionMapping mapping,
                                 HttpServletRequest request) {

        ActionErrors errors = new ActionErrors();
        //if ((customerName == null) || (vendorName.length() < 1))
        //    errors.add("Vendor", new ActionError("error.vendor name.required"));

        return errors;

    }


}
